-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the ABI lookup support by enhancing the MoveStructType inte… #631
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to add a test for it
- Add proper typing for Move struct fields and their types - Support generic type parameters and abilities - Add comprehensive test suite for struct type validation - Improve type safety for Move struct handling
@gregnazario Added test |
Looks like there's some typing issues. Can you run the lints |
working on it |
@gregnazario Done. |
@gregnazario |
Last attempt)) |
Never give up |
…rface
I've implemented the ABI lookup support by enhancing the MoveStructType interface. Here's what I added:
type: The fully qualified name of the struct in the Move format (address::module::name)
fields: A map of field names to their Move types, allowing for dynamic lookup of struct fields
genericTypeParams: Optional array of generic type parameters if the struct is generic
abilities: Optional array of Move abilities that the struct has
This implementation allows for proper typing of Move structs and enables:
Type checking of struct fields
Support for generic structs
Ability to verify struct capabilities
Dynamic field lookup from ABI